package com.chidopi.market.aa.dao;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;

import com.chidopi.cdf.dao.IBaseDao;
import com.chidopi.cdf.dao.ICommonDao;
import com.chidopi.cdf.dao.impl.CommonDaoImpl;
import com.chidopi.cdf.tag.ITagDao;
import com.chidopi.market.RootConfig;
import com.chidopi.market.aa.dao.impl.AccountDaoImpl;
import com.chidopi.market.aa.dao.impl.FunctionDaoImpl;
import com.chidopi.market.aa.dao.impl.FunctionItemDaoImpl;
import com.chidopi.market.aa.dao.impl.RoleDaoImpl;
import com.chidopi.market.aa.dao.impl.TagDaoImpl;
import com.chidopi.market.aa.domain.Accounts;
import com.chidopi.market.aa.domain.FunctionItems;
import com.chidopi.market.aa.domain.Functions;
import com.chidopi.market.aa.domain.Roles;


@Configuration
@Import(RootConfig.class)
public class DaoConfig {
	private static Logger logger = LoggerFactory.getLogger(DaoConfig.class);
	@Bean(name="commonDao")
	public ICommonDao commonDao() {
		return new CommonDaoImpl();
	}

	@Bean(name="accountDao")
	public IBaseDao<Accounts> AccountDao() {
		logger.debug("AccountDao is called!!");
		return new AccountDaoImpl();
	}

	@Bean(name="functionDao")
	public IBaseDao<Functions> FunctionDao() {
		logger.debug("FunctionDao is called!!");
		return new FunctionDaoImpl();
	}

	@Bean(name="roleDao")
	public IBaseDao<Roles> RoleDao() {
		logger.debug("FunctionDao is called!!");
		return new RoleDaoImpl();
	}

	@Bean(name="itemDao")
	public IBaseDao<FunctionItems> FunctionItemDao() {
		logger.debug("FunctionItemDao is called!!");
		return new FunctionItemDaoImpl();
	}

	@Bean(name="tagDao")
	public ITagDao tagDao() {
		logger.debug("FunctionDao is called!!");
		return new TagDaoImpl();
	}
	
	@Bean(name="passwordDao")
	public IPasswordDao passwordDao(){
		logger.debug("PasswordDao is called!!");
		return new PasswordDaoImpl();
	}
	
}
